home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 5
/
Aminet 5 - March 1995.iso
/
Aminet
/
gfx
/
board
/
ShowJPEG15.lha
/
ShowJPEG.doc
< prev
next >
Wrap
Text File
|
1995-02-02
|
10KB
|
341 lines
=========================
ShowJPEG V1.5
=========================
2. Feb., 1995
Copyright (c) 1994/95 by Roman Hiestand
Copyright notice
----------------
The program ShowJPEG and its documentation are written and copyrighted by
Roman Hiestand. They may be distributed freely providing the following
restrictions are satisfied:
- Distributors may not charge more than the cost of a diskette used in
the distribution of this program.
- Distributors may only distribute the unmodified copy of the original
program, along with it's documentation, and copyright notices intact.
- Commercial distribution is only possible with written permission
from the author.
Disclaimer
----------
This program and its documentation is provided "as is". No warranties are made
with respect to the accuracy, reliability, performance or operation of this
software and information. You are using this program at your own risk. The
author is not liable for any damages that may have been caused by using this
software.
Introduction
------------
It is done ! After hours and hours of hacking, debugging and #@©°!*-ing,
this peace of software is ready to distribute:
ShowJPEG
the successor to the world-famous (:-) ShowGIF.
I always wanted to replace the ViewJPEG delivered with the picasso-board,
because it is buggy, incomplete and slow. But, you can believe me, jpeg
is a tough and complicated topic. So I decided not to rewrite the whole
thing but simply use the jpeg link-library from the independent JPEG
software group. It is fairly quick and customizable, but it's big...
That's why the program is quite large.
Features
--------
- As compatible to the jpeg-standard as software can be
- Supports greyscaled pictures
- Various speed/quality tradeoff settings
- Fast
- CLI or WB start
- Can be aborted anytime (with Ctrl-C or Escape)
- Filerequester (since V1.2)
- Pattern matching (since V1.3)
- Nocrop option (since V1.4)
- Backdrop-screen (since V1.5)
Usage
-----
From CLI: ShowJPEG File [...]
From WB : via default tool or extended selection
Template:
FILE/M,Q=QUALITY/K,SC=SCALE/N,DELAY/N,GRAY=GREY/S,VERBOSE/S,
8BIT/S,16BIT/S,24BIT/S,NOCENTER/S,ALL/S,NC=NOCROP/S,BEHIND/S
The options are accessible from CLI or Workbench.
FILES/M One or more filenames
Example: ShowJPEG DF0:Pictures/Tron.JPEG
Q=QUALITY/K The quality, one of BEST, NORMAL [default] or FAST.
BEST is always the best it can do, NORMAL is what I
considered as good enough but not too slow, and FAST
is always the fastest.
For more information see below.
Examples: ShowJPEG Tron.JPEG Q=BEST
ShowJPEG Tron.JPEG QUALITY BEST
ShowJPEG Tron.JPEG Q FAST
Default: NORMAL
SC=SCALE/N The scale factor, one of 1, 2, 4 or 8 (-> 1/1, 1/2..).
If you want to see a very large picture in whole or
you want to have just a quick preview, use scale.
Example: ShowJPEG BigPicture.jpg SCALE 2
ShowJPEG VeryBigPicture.jpg SC=8
Default: 1
DELAY/N Waits n seconds after displaying the picture.
Example: ShowJPEG Slideshow/*.jpg DELAY=5
Default: off
GRAY=GREY/S Displays the picture in grayscale. Use this if you
want to have a quick preview.
Example: ShowJPEG SlowPicture.jpg GREY
Default: off
VERBOSE/S Prints out information about the picture:
Width x Height x Depth of the picture ->
Width x Height x Depth of the screen
Example: ShowJPEG VERBOSE Pic.jpg
Default: off
8BIT/16BIT/24BIT
Use these options if you want the picture displayed
in a certain screen depth. If it doesn't fit the
screen it's being cropped.
Example: ShowJPEG 24BIT LargePicture.jpeg
Default: off, this means the screen is chosen such
that the whole image fits the screen. If the image
is larger than the largest 8-Bit-screen the image
is cropped.
NOCENTER/S Don't display the picture in the center of the
screen.
Default: off
ALL/S Searches all subdirectories for the supplied
pattern (see also: Pattern matching).
Default: off
NC=NOCROP/S Simply put: if you set NOCROP, your picture won't
be cropped. It will be scaled, if necessary. If you
supply also the display depth, this one will be used.
If you didn't supply a depth, then after each scale-
step the depth will be reconsidered, meaning: it
choses the highest possible depth for the scaled
picture (If this explanation confused you, try
it out with VERBOSE set).
Example: ShowJPEG 24BIT LargePicture.jpeg
This LargePicture will be scaled until it fits a
24 bit resolution.
Default: off
BEHIND/S This option opens a screen behind. It is only
useful for displaying multiple pictures.
After the first picture, ViewJPEG opens a
backdrop screen with the same ModeID.
This may help avoid 'flickering' due to
different screen modes of the Workbench and the
picture screen. But: it uses up a lot of memory,
because the same ModeID requests the same depth
and the same size of the screen.
Default: off
Every combination is possible:
ShowJPEG QUALITY BEST DF0:Pictures/Tron.jpeg
ShowJPEG Q=FAST DH0:Art/MonaLisa.jpg
ShowJPEG DF0:Pictures/Tron.jpg 24BIT
ShowJPEG 8BIT DH0:Art/WindyDay.jpg DELAY 10 GREY VERBOSE
From Workbench:
ShowJPEG reads it's own tooltypes and takes them as its
defaults. It reads the tooltypes of every picture and uses
these options, but they are switched back for the next
picture.
Ctrl-C is now handled more correctly. You can break the whole
program by typing Ctrl-C into the picture while it is being
decoded. You can't break the program in the CLI !
Since V1.5 you can now use Escape, too.
The Quality setting
-------------------
For those of you who know the jpeg-software:
- BEST means: Fancy upsampling
if quantizing: two pass quantize, Floyd-Steinberg dithering
- NORMAL means: normal upsampling
one pass quantize, ordered dithering
- FAST means: normal upsampling
one pass quantize, no dithering
In true/high color mode, the quality setting won't affect too much.
But if the software has to reduce to 8 bits, the quality gain is very
big: FAST is just a quick preview, NORMAL is not much slower but a quite
good picture and BEST is what you could expect from any graphics
software but is slow. (Anyway, BEST is ~3 times faster than ImageFX and
gives similar results !)
In BEST mode it (normally) uses a temporary file in T:, so don't set this
to RAM: unless you have >2 Megs of free RAM.
Pattern Matching
----------------
(NB: * only works if you use WildStar or a similar program. Use #?
instead)
Since V1.3 pattern matching is implemented. As this is a complex matter
and it's not really the same in every program, I describe it in this
chapter.
ShowJPEG splits your supplied pattern into two parts:
ShowJPEG DF0:Pictures/*.jpg
| Path || pattern \
- The easy case: the path is not a pattern
ShowJPEG just searches the pattern in the supplied path and displays
every picture found.
Example: ShowJPEG DF0:Pictures/*.jpg
displays every picture in DF0:Pictures with .jpg at the end.
ShowJPEG DF0:Pictures/A*
displays every picture in DF0:Pictures starting with A or a.
If you add 'ALL', the supplied path is taken as a starting point.
Every subdirectory is now searched for the pattern.
Example: ShowJPEG DF0:*.jpg ALL
displays every picture in DF0: and its subdirectories with
.jpg at the end.
- The complex case: the path is a pattern
ShowJPEG searches now every path that matches the path pattern for
the file pattern.
The same with 'ALL', but now every subdirectory is searched too.
Example: ShowJPEG DH0:G*/A*.jpg
displays every picture in DH0:Graphics, DH0:Games ...
that matches A*.jpg (A at the beginning and .jpg at the end)
ShowJPEG DH0:G*/A*.jpg
displays every picture in all subdirectories of DH0:Graphics,
DH0:Games ... that matches A*.jpg
ShowJPEG DH0:G*/*.jpg
displays every .jpg picture in every subdirectory of
every directory starting with DH0:G (this can be a lot !)
Of course, every standard pattern matching characters can be used:
? Matches any single character
# Matches zero or more of the following character
| Separates OR clauses
* Matches any number of arbitrary characters (only with WildStar)
Examples:
- *.jpg matches Tron.jpg, Picture.jpg
- #a.jpg matches .jpg, a.jpg, aa.jpg, aaa.jpg ...
- A* matches Ape.jpg, a.jpg, Amiga.jpg (but also: Amiga.jpg.info !)
- a(b|c).jpg matches ab.jpg and ac.jpg
Pattern matching is NOT case sensitive.
Requirements
------------
Kick 2.0 and vilintuisup.library version > 2.0.
Bugs
----
- Message window at WB-start disappears too quickly
I tested the program with various JPEG-pictures and with Enforcer on my
A3000. No misbehaviour could be found. But on different computer-systems
with different environments, nobodoy knows what's gonna happen...
If you find a bug, please report it to me together with as much information
as possible that could help me to fix it: your computer, configuration, kick
version and so on.
Thanks
------
My thanks go to:
- VillageTronic for their wonderful card
- the developers of the GNU-C-compiler and libnix
- the Independent JPEG Group for their software
Future plans
------------
- ??
Tell me if you want to have more options !
Revisions
---------
1.0 - first public release
1.1 - Added NOCENTER
Remark: different default behaviour, it displays
now a picture in the center of the screen
(requested by Stefan Hülswitt)
1.2 - Added Filerequester
When no picture could be loaded, a file requester
pops up
1.3 - Added Pattern matching
Handles Ctrl-C better
1.4 - Added NOCROP option, rewrote OpenScreen code
(requested by Stefan Huelswitt and Antti Miettinen)
Corrected small bug (grey picture handling)
Compiled with gcc 2.6.3
Linked with jpeg library 5a and libnix 0.7
1.5 - Escape behaves now like Ctrl-C
Added BEHIND option (requested by Henning Sauer)
Address
-------
I can be reached at
Roman Hiestand
Luziaweg 15
CH-8807 Freienbach
Switzerland
Fax: CH-055/48 26 37
email: rhiestan@iiic.ethz.ch